/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from "react";
import { View, StatusBar } from "react-native";
import { container } from "./until/commonStyle";

// 路由配置
import { StackNavigator } from "react-navigation";
// import PageMenu from "./pages/PageMenu";
// import PageReport from "./pages/PageReport";
// import PageNews from "./pages/PageNews";
// import PageUser from "./pages/PageUser";
const RootStack = StackNavigator(
  {
    // PageMenu: {
    //   screen: PageMenu
    // },
    // PageReport: {
    //   screen: PageReport
    // },
    // PageNews: {
    //   screen: PageNews
    // },
    // PageUser: {
    //   screen: PageUser
    // }
  },
  {
    initialRouteName: "PageMenu",
    navigationOptions: {
      headerStyle: {
        backgroundColor: "#3f51b5",
        paddingTop: 20,
        height: 70
      },
      headerTintColor: "#fff",
      headerTitleStyle: {
        fontWeight: "bold"
      }
    }
    // mode: "card",
    // headerMode: "none",
  }
);

/**
 * App根实例
 *
 * @export
 * @class App
 * @extends {Component}
 */
export default class App extends Component {
  render() {
    return (
      <View style={container}>
        <StatusBar
          backgroundColor="transparent"
          barStyle="light-content"
          translucent={true}
        />
        <RootStack />
      </View>
    );
  }
}
